package cn.iocoder.yudao.module.agent.controller.admin.brokeragerecord.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 代理人佣金记录 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class AgentBrokerageRecordBaseVO {

    @Schema(description = "代理人会员编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1256")
    @NotNull(message = "代理人会员编号不能为空")
    private Long agentUserId;

    @Schema(description = "源会员编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3201")
    @NotNull(message = "源会员编号不能为空")
    private Long sourceUserId;

    @Schema(description = "业务id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11731")
    @NotNull(message = "业务id不能为空")
    private Integer bizId;

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "标题不能为空")
    private String title;

    @Schema(description = "说明", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @NotNull(message = "说明不能为空")
    private String description;

    @Schema(description = "来源订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20499")
    @NotNull(message = "来源订单id不能为空")
    private Long orderId;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "13921")
    @NotNull(message = "金额不能为空")
    private Integer price;

    @Schema(description = "总佣金", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "总佣金不能为空")
    private Integer brokerage;

    @Schema(description = "状态：0-待结算，1-已结算，2-已取消", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态：0-待结算，1-已结算，2-已取消不能为空")
    private Byte status;

    @Schema(description = "冻结时间（天）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "冻结时间（天）不能为空")
    private Integer frozenDays;

    @Schema(description = "解冻时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime unfreezeTime;

}
